package com.kehongborui.portal.config;

import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief druid 配置
 * @email 122162005@qq.com
 * @date 2018-09-20
 */
@ConfigurationProperties(
        prefix = "druid"
)
@Setter
public class DruidProperties {
    private String initialSize = "4";
    private String minIdle = "4";
    private String maxActive = "20";
    private String maxWaitMillis = "60000";
    private String minEvictableIdleTimeMillis = "30000";

    public int getInitialSize() {
        return Integer.parseInt(initialSize);
    }

    public int getMinIdle() {
        return Integer.parseInt(minIdle);
    }

    public int getMaxActive() {
        return Integer.parseInt(maxActive);
    }

    public int getMaxWaitMillis() {
        return Integer.parseInt(maxWaitMillis);
    }

    public int getMinEvictableIdleTimeMillis() {
        return Integer.parseInt(minEvictableIdleTimeMillis);
    }
}
